package com.tts.controller;

import com.tts.dto.ApiResponse;
import com.tts.dto.UpdatePasswordRequest;
import com.tts.service.UserService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/user")
@Tag(name = "用户管理")
public class UserController {
    
    @Autowired
    private UserService userService;
    
    @PutMapping("/password")
    @Operation(summary = "修改密码")
    public ApiResponse<Void> updatePassword(@RequestBody UpdatePasswordRequest request) {
        userService.updatePassword(request);
        return ApiResponse.success(null);
    }
} 